from pages.login_page import LoginPage


class LoginOper:
    def __init__(self, driver):
        self.page = LoginPage(driver)

    def input_username(self, username):
        elem = self.page.find_username()
        elem.clear()
        elem.send_keys(username)

    def input_password(self, password):
        elem = self.page.find_password()
        elem.clear()
        elem.send_keys(password)

    def input_verifycode(self, verifycode):
        elem = self.page.find_verifycode()
        elem.clear()
        elem.send_keys(verifycode)

    def click_login_btn(self):
        self.page.find_login_btn().click()
